Contents - Enumeration - Interval - Read images - Remap function - Ask the colour of the pixie - Mesh Colour (Colour is stored in the vertex data) - One reason why AutoCompletion does not work on my PC
for i, rectangle in enumerate(geo): #!
r = deepcopy(rectangle)
degree = math.radians(random.randint(-rectangle, Corner(2).Y))
# The for loop is the same as below
for i in range(len(geo)): #!
r = deepcopy(rectangle)
degree = math.radians(random.randint(-rectangle, Corner(2).Y))
import System
import os
HERE = ghenv.LocalScope.ghdoc.Path
dir_path = os.path.dirname(HERE)
bitmap = System.Drawing.Image.FromFile(dir_path + "\\" + inTemp + ".png")
deltaPixelX = bitmap.Width / nx
deltaPixelT = bitmap.Height / ny
# Ask the colour of the pixie
color = System.Drawing.Bitmap.GetPixel(bitmap, x, y)
def remap(value, low1, high1, low2, high2):
new_value = low2 + (value-low1)*(high2-low2)/(high1-low1)
return new_value
import System
import os
HERE = ghenv.LocalScope.ghdoc.Path
dir_path = os.path.dirname(HERE)
bitmap = System.Drawing.Image.FromFile(dir_path + "\\" + inTemp + ".png")
deltaPixelX = bitmap.Width / nx
deltaPixelT = bitmap.Height / ny
# Ask the colour of the pixie
color = System.Drawing.Bitmap.GetPixel(bitmap, x, y)
box_mesh.VertexColors.CreateMonotoneMesh(self.color)
"python.autoComplete.extraPaths": [
"C:\\Users\\Zac\\AppData\\Roaming\\McNeel\\Rhinoceros\\7.0\\Plug-ins\\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\\settings\\lib",
"C:\\Users\\Zac\\AppData\\Roaming\\McNeel\\Rhinoceros\\7.0\\scripts",
"C:\\Users\\Zac\\AppData\\Roaming\\McNeel\\Rhinoceros\\7.0\\Plug-ins\\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\\settings\\lib",
"C:\\Applications\\Rhino 7\\Plug-ins\\IronPython\\Lib",
"C:\\Users\\Zac\\AppData\\Roaming\\McNeel\\Rhinoceros\\7.0\\Plug-ins\\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\\settings\\lib",
// There is a "C:\Program Files\Common Files\McNeel\Rhinoceros\7.0\Plug-ins\CodeListener" very annoying and occupied the autoCompletion when scripting GHPython. Delete this one then autoCompletion is fine.
"C:\\Users\\Zac\\AppData\\Roaming\\McNeel\\Rhinoceros\\7.0\\Plug-ins\\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\\settings\\lib\\ghpythonlib"
],
--- Growing, Growing, Brighter Everyday ! ---